package com.wl.mr.sortmub;

import org.apache.commons.lang.ObjectUtils;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class SortNumMapper extends Mapper<LongWritable, Text,LongWritable, NullWritable> {
    LongWritable longWritable = new LongWritable();

    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {

        longWritable.set(Long.parseLong(value.toString()));
        context.write(longWritable, NullWritable.get());

    }
}
